export namespace Doc {
  export type DocType = "folder" | "doc";

  export interface DocNode {
    FId: string;
    FSpaceId: string;
    FParentId?: string | null;
    FTitle: string;
    FType: DocType;
    FContent?: string;
    FAuthorId?: string;
    FAuthorName?: string;
    FViews?: number;
    FCreatedAt?: string;
    FUpdatedAt?: string;
    FIsPublic?: boolean;
    FInheritParent?: boolean;
    FVisibleUserIds?: string[];
    children?: DocNode[];
  }

  export interface AddDocNodeParams {
    FSpaceId: string;
    FParentId?: string;
    FTitle: string;
    FType: DocType;
    FContent?: string;
    FAuthorId: string;
  }

  export interface UpdateDocNodeParams {
    FId: string;
    FTitle?: string;
    FContent?: string;
    isAdmin?: boolean;
  }

  export interface VisibilitySettings {
    FIsPublic: boolean;
    FInheritParent: boolean;
    FVisibleUserIds: string[];
  }

  export interface SetVisibilityParams {
    FDocId: string;
    FIsPublic: boolean;
    FInheritParent: boolean;
    isAdmin?: boolean;
    FUserIds?: string[];
  }
}
